import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int y = x;
        int count = 0;
        while(y != 0){
            count++;
            y /= 10;
        }
        while(count != 0){
            int q = x /(int)Math.pow(10,count - 1);
            int ret = q % 10;
            System.out.printf("%d ",ret);
            count--;
        }
        sc.close();
    }
}
